package jungsun;

import java.util.Scanner;

public class J03Tax {
	// 세금계산프로그램
	//1,조건1:미혼-연봉이 3000미만:5%
	//           연봉이 3000이상:10%
	//조건2:기혼-연봉이 5000미만:15%
    //         연봉이	5000이상 :30%
	// 입력값:결홍여부,연봉
	//결과:세금율에따름 세금
	
	public static void main(String[] args){
		
		//1.변수선언
		int married;//결혼여부,0:미혼,1:결혼
		int salary;    //연봉
		double tax=0;//초기화팔수
		String title1 = "결혼여부입력";//(0:미혼,1:결혼)
		String title2 = "연봉을입력";
		Scanner sc = null;
        //2. 결혼여부,연봉계산및세금계산
		sc = new Scanner(System.in);
		System.out.println(title1);//결혼여부
		married = sc.nextInt();
		System.out.println(title2);
		salary = sc.nextInt();
		
		if (married==0){
			if(salary<3000){tax = salary *0.05;}
			else if (salary>=3000){tax = salary *0.1;}
		}
		if (married==1){
			if(salary<5000){tax = salary *0.15;}
			else if(salary>=5000){tax = salary *0.3;}
		}
		sc.close();// 주의
		
		//3,결과 확인
		System.out.println(married);
		System.out.println(salary);
		System.out.println(tax);
	

	
	}

}
